home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / embedded / mcu332 / c32src.arc / RESETV.SA < prev   
Text File  |  1991-03-01  |  31KB  |  580 lines

  1.  
  2. ** Set checksum at "CHECKVAL" below! **
  3.  
  4.          TTL       Reset Vector and Code Size
  5.          OPT       P=68332
  6. ******************************************************************************
  7. ** Exported portion                                                        ***
  8. *V****************************************************************************
  9. ***                                                                        ***
  10. ***   MODULE:                                                              ***
  11. ***     RESETV - This module contains the reset vector for the system.     ***
  12. ***              It also includes a longword that contains the size of     ***
  13. ***              the code segment in bytes and all of the user custom-     ***
  14. ***              ization parameters.                                       ***
  15. ***                                                                        ***
  16. ***   ENVIRONMENT:                                                         ***
  17. ***     M68300 BCC EVM system                                              ***
  18. ***                                                                        ***
  19. ***   LANGUAGE:                                                            ***
  20. ***     M68MASM for MS-DOS MC68332 assembly language relocatable module    ***
  21. ***                                                                        ***
  22. ***   SUMMARY OF CONTENTS:                                                 ***
  23. ***      <will be linked to start at $E0000 for BCC>                       ***
  24. ***      System reset vector.                                              ***
  25. ***      Code segment size.                                                ***
  26. ***      User customization parameters.                                    ***
  27. ***                                                                        ***
  28. ***   NOTES:                                                               ***
  29. ***     1.  Source equivalent copy of CPU32Bug parameter area for Motorola ***
  30. ***         FREEWARE Bulletin Board System (BBS) to produce object         ***
  31. ***         equivalent code.  See REVISION HISTORY below for version nbr.  ***
  32. ***     2.  This source code can be freely used at no cost/obligation,     ***
  33. ***         i.e. it is PUBLIC DOMAIN software.  Please report any errors/  ***
  34. ***         additions to the SYSOP of the Motorola FREEWARE BBS.           ***
  35. ***     3.  Parameters which reference linker symbols (XREF/XDEF) will     ***
  36. ***         not be defined until link time, so the obj. code listed here   ***
  37. ***         will not match the actual EPROM code.                          ***
  38. ***                                                                        ***
  39. *^****************************************************************************
  40. ***  INTERNAL PORTION OF THE MODULE HEADER                                 ***
  41. ******************************************************************************
  42. ***                                                                        ***
  43. ***   REVISION HISTORY (add changes to the top):                           ***
  44. ***                                                                        ***
  45. ***      DATE         AUTHOR               CHANGES                         ***
  46. ***   ----------  ---------------  -------------------------------------   ***
  47. ***    03/01/91   Peter S. Gilmour Compatible with CPU32Bug version 1.00.  ***
  48. ***    05/02/90   Peter S. Gilmour Compatible with 332Bug version 1.02.    ***
  49. ***    01/16/90   Peter S. Gilmour Initial version port to MS_DOS based    ***
  50. ***                                M68MASM from original source code.      ***
  51. ***                                Compatible with 332Bug version 1.01.    ***
  52. ***                                                                        ***
  53. ******************************************************************************
  54.  
  55. ***                                                                        ***
  56. ***   XDEFS:                                                               ***
  57. ***                                                                        ***
  58.          XDEF      ORIGIN              Start of program space
  59.          XDEF      CODESIZE            Size of program space in bytes
  60.          XDEF      CHECKSUM            Permit access by confidence test
  61. * Old CSn base addr reg. values
  62.          XDEF      .CSBAR0,.CSBAR1,.CSBAR2,.CSBAR3,.CSBAR4,.CSBAR5
  63.          XDEF      .CSBAR6,.CSBAR7,.CSBAR8,.CSBAR9,.CSBAR10
  64. * Old CSn base addr reg. values
  65.          XDEF      .CSOR0,.CSOR1,.CSOR2,.CSOR3,.CSOR4,.CSOR5
  66.          XDEF      .CSOR6,.CSOR7,.CSOR8,.CSOR9,.CSOR10
  67. * Common CSBOOT values
  68.          XDEF      .CSBARBT            Old/new CSBOOT base addr reg. value
  69.          XDEF      .CSORBT             Old/new CSBOOT option reg. value
  70. * New CSn base addr reg. values
  71.          XDEF      CSBAR0$,CSBAR1$,CSBAR2$,CSBAR3$,CSBAR4$,CSBAR5$
  72.          XDEF      CSBAR6$,CSBAR7$,CSBAR8$,CSBAR9$,CSBAR10$
  73. * New CSn base addr reg. values
  74.          XDEF      CSOR0$,CSOR1$,CSOR2$,CSOR3$,CSOR4$,CSOR5$
  75.          XDEF      CSOR6$,CSOR7$,CSOR8$,CSOR9$,CSOR10$
  76.  
  77.          XDEF      MCR_OR              MCR bits to add at power-on
  78.          XDEF      MCR_AND             MCR bits to delete at power-on
  79.          XDEF      .PICR               Periodic interrupt control reg. value
  80.          XDEF      .PITR               Periodic interrupt timer reg. value
  81.          XDEF      RB_SP               Rom Auto Boot SP location in ROM
  82.          XDEF      RB_PC               Rom Auto Boot PC location in ROM
  83.          XDEF      CONSCI              Console default SCI parameter table
  84.          XDEF      .PARMS              SCI parameter definition
  85.          XDEF      .BAUD               SCI baud rate value
  86.          XDEF      .PARITY             SCI parity value
  87.          XDEF      .DATA               SCI nbr. data bits value
  88.          XDEF      .STOP               SCI nbr. stop bits value
  89.          XDEF      .XON_ENB            SCI XON/XOFF enable value
  90.          XDEF      .XON                SCI XON value
  91.          XDEF      .XOFF               SCI XOFF value
  92.          XDEF      SYPCR_OR            SYPCR bits to add at power-on
  93.          XDEF      SYPCR_AND           SYPCR bits to delete at power-on
  94.          XDEF      FEXTAL              External clock frequency (in Hz)
  95.          XDEF      FCRYSTAL            Crystal frequency (in Hz)
  96.          XDEF      PWR_ON              Start of Power on branch vectors
  97.          XDEF      PWR_TBL1            Init. Table #1 Power on branch vector
  98.          XDEF      PWR_INI             MCU init. Power on branch vector
  99.          XDEF      PWR_TBL2            Init. Table #2 Power on branch vector
  100.          XDEF      PWR_TTL             Sign on title Power on branch vector
  101.          XDEF      PWR_TST             Self-test Power on branch vector
  102.          XDEF      PWR_GO              System Go Power on branch vector
  103.          XDEF      INITTBL             Initialization Table
  104.          XDEF      INITTBLE            Initialization Table end
  105.          XDEF      SIGNON              Offset to system sign on message text
  106. ***                                                                        ***
  107. ***   XREFS:                                                               ***
  108. ***                                                                        ***
  109.          XREF      CONFTST             Confidence test entry point
  110.          XREF      SYSINIT             Start of program (system init.)
  111.          XREF      INIT_CS             MCU initialization (chip selects, etc.
  112.          XREF      INIT_T1             Table #1 Initialization
  113.          XREF      INIT_T2             Table #2 Initialization
  114.          XREF      MEMPAGE             16 Megabyte page
  115. ***                                                                        ***
  116. ***   Local macros:                                                        ***
  117. ***                                                                        ***
  118. VECTOR   MACRO                         ! SETUP VECTOR SPACE
  119. SECTD    SET       0                   ! DEFINE DATA SECTION
  120. SECTP    SET       8                   ! DEFINE PROGRAM SECTION
  121.          SECTION   SECTP               ! PUT USER INTO PROG. SECTION
  122.          ENDM                          !
  123.  
  124. ***
  125. ***   Local equates:
  126. ***
  127. CR       EQU       $0D       ASCII carriage return
  128. LF       EQU       $0A       ASCII line feed
  129. SPACE    EQU       $20       ASCII space
  130.  
  131. *
  132. *  For M68300 BCC and PFB.
  133. *
  134. *  NOTE: Unused upper address lines are specified as 1's so ABSOLUTE SHORT
  135. *        addressing (sign extension) can be used.
  136. *
  137. SR_VAL    EQU      $2700               status register initial value.
  138.  
  139. RAM_BASE  EQU      $0                  BCC RAM base address
  140. RAM_SIZE  EQU      $10000              BCC RAM size (bytes)
  141. ROM1_BASE EQU      $E0000              BCC EPROM base address
  142. ROM1_SIZE EQU      $20000              BCC EPROM size (bytes)
  143. IRAM_BASE EQU      $40000
  144. FPCP_BASE EQU      $FFFFE800           PFB MC68881/MC6882 base address
  145. *                                      .  (Floating Point Co-Processor)
  146. FCRYSTVAL EQU      32768               Crystal frequency (in Hz)
  147. HI_BASE   EQU      $FFFFF000           CPU32 module (registers) base high addr
  148. *                                      .  This is the default used at power-up!
  149. LO_BASE   EQU      $007FF000           CPU32 module (registers) base low  addr
  150. SIM       EQU      $A00                CPU32 System Integration Module base addr
  151. RAMCR     EQU      $B00                CPU32 RAM Control Module base offset
  152. QSM       EQU      $C00                CPU32 Queued Serial Module base offset
  153. AUTO_BASE EQU      $FFFFF800           Autovector base address
  154.  
  155. * Define bits for Power Up Status (PWRSTATUS) flag:
  156. EXTAL_BIT  EQU     31             External Clock flag bit:    0= off (VCO)
  157. CHKSUM_BIT EQU     30             Checksum not pgm'd yet bit: 0= pgm'd
  158.  
  159. LOCALRAM  EQU      RAM_BASE            base of local RAM
  160. SYSRAMSZ  EQU      $00004000           size of local RAM (for system use)
  161. LCLRAMMX  EQU      RAM_SIZE            max size of local RAM (for M68332 BCC)
  162. USRRAM    EQU      LOCALRAM+SYSRAMSZ   base of user RAM
  163. USRRAMSZ  EQU      LCLRAMMX-SYSRAMSZ   size of user RAM
  164. RAMSTART  EQU      LOCALRAM            alias for base of local RAM
  165.  
  166. LOCALROM  EQU      ROM1_BASE           base of local ROM (use PC rel refs!)
  167. LCLROMSZ  EQU      $00010000           size of local ROM used by 332Bug
  168. ROMUNPGM  EQU      $FF                 unprogrammed state of a byte of EPROM
  169. FILL.1    EQU      ROMUNPGM            fill value for 1 byte = BYTE
  170. FILL.2    EQU      FILL.1<<8+FILL.1    fill value for 2 bytes= WORD
  171. FILL.4    EQU      FILL.2<<16+FILL.2   fill value for 4 bytes= LONG WORD
  172.  
  173. RAM2_BASE EQU      LOCALRAM+LCLRAMMX   Next RAM base address
  174. ROM2_BASE EQU      ROM1_BASE+ROM1_SIZE Next ROM base address
  175.  
  176. VECTSIZ  EQU       $400                Vector table size
  177. USERLEN  EQU       $1000               user space reserved
  178. MEMINC   EQU       $4000               memory increment for 130's or EVM's
  179. STKLEN   EQU       MEMINC-USERLEN-VECTSIZ-4 size of bug/diag stack + static vars
  180.  
  181. *
  182. * Interrupt levels & vectors
  183. *
  184. ABORTLVL EQU       7                   abort level
  185. ABORTVEC EQU       31                  abort vector
  186. ACFAILVL EQU       7                   AC-Fail level
  187. ACFAILVC EQU       65                  AC-Fail vector
  188. TIMERLVL EQU       6                   timer level: M68332 periodic int. timer
  189. TIMERVEC EQU       66                  timer vector
  190.  
  191. *
  192. *  Setup Base Addresses:
  193. *    1. A31-A24 must= 0  (MC68332 only uses A0-A23; rest are unused!)
  194. *    2. A10-A0  must= 0  (for Base Address Register usage).
  195. *
  196. ADDRMASK EQU       $00FFF800           Address mask (24-bits, A10-A0= 0)
  197. RAM      EQU       RAM_BASE&ADDRMASK   Setup Base Addresses
  198. ROM      EQU       ROM1_BASE&ADDRMASK  Setup Base Addresses
  199. RAM2     EQU       RAM2_BASE&ADDRMASK  Setup Base Addresses
  200. ROM2     EQU       ROM2_BASE&ADDRMASK  Setup Base Addresses
  201. FPCP     EQU       FPCP_BASE&ADDRMASK  Setup Base Addresses
  202. IRAM     EQU       IRAM_BASE&ADDRMASK  Setup Base Addresses
  203. AVEC_7   EQU       AUTO_BASE&ADDRMASK  Setup Base Addresses
  204.  
  205. CSBAR_XX EQU       $0000               Reset (unused) value for CSBARn
  206. CSOR_XX  EQU       $0000               Reset (unused) value for CSORn
  207.  
  208. *
  209. * Option Register Equates (CSORBT, CSORn):
  210. *
  211. B2K      EQU       0                   2K    block size
  212. B8K      EQU       1                   8K    block size
  213. B16K     EQU       2                   16K   block size
  214. B64K     EQU       3                   64K   block size
  215. B128K    EQU       4                   128K  block size
  216. B256K    EQU       5                   256K  block size
  217. B512K    EQU       6                   512K  block size
  218. B1M      EQU       7                   1MB   block size
  219. ASYNC    EQU       $0000               Asynchronous mode
  220. SYNC     EQU       $8000               Synchronous  mode
  221. CS_UPPB  EQU       2*$2000             Upper byte
  222. CS_LOWB  EQU       1*$2000             Lower byte
  223. CS_BOTHB EQU       3*$2000             Both  bytes (upper or lower)
  224. CS_R     EQU       1*$800              Read
  225. CS_W     EQU       2*$800              Write
  226. CS_RW    EQU       3*$800              Read or write
  227. CS_AS    EQU       0*$400              Address Strobe (AS*)
  228. CS_DS    EQU       1*$400              Data    Strobe (DS*)
  229. CS_FAST  EQU       14                  Fast     termination DSACK*
  230. CS_EXT   EQU       15                  External termination DSACK*
  231. CS_WAIT  EQU       1*$40               Wait cycles for DSACK*
  232. CS_CSP   EQU       0*$10               CPU  space
  233. CS_USP   EQU       1*$10               User space
  234. CS_SSP   EQU       2*$10               Supervisor space
  235. CS_SUSP  EQU       3*$10               Supervisor/User space
  236. CS_LVL   EQU       1*$2                Interrupt priority level
  237. CS_AVEC  EQU       1                   Autovector enable
  238.  
  239.  
  240. * Select value for checksum below:
  241. *   - place "*" in front of the one you DON'T want assembled
  242. *
  243. *CHECKVAL EQU       FILL.2              Checksum value for debugging
  244. CHECKVAL EQU       $3033               Checksum value for finished product
  245. *                                      .   - must not be same as FILL.2!
  246. * The actual value of the checksum word is not known at the time
  247. * that this file is assembled or linked.  However, an "intelligent"
  248. * checksum method is used whereby the program tells the user what
  249. * the checksum should be if the checksum hasn't been programmed yet!
  250. * Make the change, re-make the program, and blow new EPROM.
  251. *
  252. * The checksum word consists of two bytes that are placed at offset
  253. * locations $0E-0F in the Bug EPROM and is used during execution of
  254. * the confidence check to validate the EPROM contents.
  255. *
  256.  
  257. ********************************
  258. **  Configuration Parameters  **
  259. ********************************
  260. *  DO NOT ALTER!  Must match with user documentation!
  261. *
  262.          VECTOR
  263. *
  264. ORIGIN   EQU       *
  265. PWR_SSP  DC.L      LOCALRAM+VECTSIZ+STKLEN Init. SSP = below user ram
  266. PWR_PC   DC.L      PWR_ON                  Init. PC  = power on branch vector
  267. **
  268. CODESIZE DC.L      ROM1_SIZE           Set Code Size (in bytes)
  269. SRECMAX  DC.B      32                  Maximum # data bytes to put in S-records
  270. *                                      .  Valid range= 1..250  (includes S3,S7)
  271. *                                      .  (used by DU command)
  272. CHECKALT DC.B      FILL.1              -- reserved -- (alternate checksum)
  273. CHECKSUM DC.W      CHECKVAL            Allocate space for checksum word
  274. *                                      . If CHECKVAL = FILL.2, then change
  275. *                                      .   value of CHECKALT location!
  276.  
  277. * NOTE: "/256" is used in the Chip Select Tables below to shift address bits
  278. *       A23-A11 to bit positions B15-B3 (23-15= 8 bits = 256) for use in the
  279. *       SIM Base Address Registers.
  280.  
  281. *----------------------------------------------------------------------------
  282. * Old Chip Select Table: (Rev. A BCC + Rev. A PFB)
  283. *
  284. .CSBAR0  DC.W      RAM/256+B64K        CS0  base & option register values
  285. .CSOR0   DC.W      0*CS_WAIT+CS_UPPB+CS_RW+CS_AS+CS_SUSP
  286. .CSBAR1  DC.W      RAM/256+B64K        CS1  base & option register values
  287. .CSOR1   DC.W      0*CS_WAIT+CS_LOWB+CS_RW+CS_AS+CS_SUSP
  288. .CSBAR2  DC.W      RAM2/256+B64K       CS2  base & option register values
  289. .CSOR2   DC.W      1*CS_WAIT+CS_BOTHB+CS_R+CS_AS+CS_SUSP
  290. .CSBAR3  DC.W      RAM2/256+B64K       CS3  base & option register values
  291. .CSOR3   DC.W      0*CS_WAIT+CS_LOWB+CS_W+CS_AS+CS_SUSP
  292. .CSBAR4  DC.W      ROM2/256+B128K      CS4  base & option register values
  293. .CSOR4   DC.W      1*CS_WAIT+CS_UPPB+CS_RW+CS_AS+CS_SUSP
  294. .CSBAR5  DC.W      ROM2/256+B128K      CS5  base & option register values
  295. .CSOR5   DC.W      1*CS_WAIT+CS_LOWB+CS_RW+CS_AS+CS_SUSP
  296. .CSBAR6  DC.W      FPCP/256+B2K        CS6  base & option register values
  297. .CSOR6   DC.W      CS_EXT+CS_BOTHB+CS_RW+CS_AS+CS_SUSP
  298. .CSBAR7  DC.W      CSBAR_XX            CS7  base & option register values
  299. .CSOR7   DC.W      CSOR_XX             .  -- unused --
  300. .CSBAR8  DC.W      AVEC_7/256          CS8  base & option register values
  301. .CSOR8   DC.W      0*CS_WAIT+CS_BOTHB+CS_R+CS_AS+CS_CSP+7*CS_LVL+CS_AVEC
  302. .CSBAR9  DC.W      CSBAR_XX            CS9  base & option register values
  303. .CSOR9   DC.W      CSOR_XX             .  -- unused --
  304. .CSBAR10 DC.W      RAM2/256+B64K       CS10 base & option register values
  305. .CSOR10  DC.W      0*CS_WAIT+CS_UPPB+CS_W+CS_AS+CS_SUSP
  306.  
  307. *----------------------------------------------------------------------------
  308. * Common Chip Select Table: (Rev. A BCC + Rev. A PFB) & (Rev. B BCC + Rev. B PFB)
  309. *
  310. .CSBARBT DC.W      ROM/256+B128K       CSBOOT base & option register values
  311. .CSORBT  DC.W      2*CS_WAIT+CS_BOTHB+CS_R+CS_AS+CS_SUSP
  312. *   - "2*CS_WAIT" = 2 wait cycles = AMD 27C1024-205LC 200 ns EPROM
  313. *     This EPROM is 2 wait cycles because it is always enabled, whereas the
  314. *     EPROM on the platform board (PFB) must first be enabled so it requires
  315. *     3 wait cycles!
  316.  
  317. *----------------------------------------------------------------------------
  318. * New Chip Select Table: (Rev. B BCC + Rev. B PFB, or later!)
  319. *
  320. CSBAR0$  DC.W      RAM/256+B64K        CS0  base & option register values
  321. CSOR0$   DC.W      CS_FAST+CS_UPPB+CS_W+CS_AS+CS_SUSP
  322. CSBAR1$  DC.W      RAM/256+B64K        CS1  base & option register values
  323. CSOR1$   DC.W      CS_FAST+CS_LOWB+CS_W+CS_AS+CS_SUSP
  324. CSBAR2$  DC.W      RAM/256+B64K        CS2  base & option register values
  325. CSOR2$   DC.W      CS_FAST+CS_BOTHB+CS_R+CS_AS+CS_SUSP
  326. CSBAR3$  DC.W      CSBAR_XX            CS3  base & option register values
  327. CSOR3$   DC.W      CSOR_XX             .  -- unused --
  328. CSBAR4$  DC.W      AVEC_7/256          CS4  base & option register values
  329. CSOR4$   DC.W      0*CS_WAIT+CS_BOTHB+CS_R+CS_AS+CS_CSP+7*CS_LVL+CS_AVEC
  330. CSBAR5$  DC.W      FPCP/256+B2K        CS5  base & option register values
  331. CSOR5$   DC.W      CS_EXT+CS_BOTHB+CS_RW+CS_AS+CS_SUSP
  332. CSBAR6$  DC.W      ROM2/256+B128K      CS6  base & option register values
  333. CSOR6$   DC.W      3*CS_WAIT+CS_LOWB+CS_RW+CS_AS+CS_SUSP
  334. CSBAR7$  DC.W      ROM2/256+B128K      CS7  base & option register values
  335. CSOR7$   DC.W      3*CS_WAIT+CS_UPPB+CS_RW+CS_AS+CS_SUSP
  336. CSBAR8$  DC.W      RAM2/256+B64K       CS8  base & option register values
  337. CSOR8$   DC.W      1*CS_WAIT+CS_BOTHB+CS_R+CS_AS+CS_SUSP
  338. CSBAR9$  DC.W      RAM2/256+B64K       CS9  base & option register values
  339. CSOR9$   DC.W      0*CS_WAIT+CS_LOWB+CS_W+CS_AS+CS_SUSP
  340. CSBAR10$ DC.W      RAM2/256+B64K       CS10 base & option register values
  341. CSOR10$  DC.W      0*CS_WAIT+CS_UPPB+CS_W+CS_AS+CS_SUSP
  342.  
  343.  
  344. *  The next two words are used to modify the Module Configuration Register (MCR)
  345. *  per the formula shown below ( "[X]" = contents of location "X"):
  346. *             MCR = ([MCR].OR.[MCR_OR]).AND.[MCR_AND]
  347. *  Thus the power-on value of MCR is read, or'ed with MCR_OR, then and'ed with
  348. *  MCR_AND, and then stored back into MCR.  This allows us to modify the default
  349. *  power-on value of MCR by adding bits we want and deleting bits we don't want!
  350. *  This process allows the user to remap the internal registers, since the MM bit
  351. *  is a write-once entity.
  352. *
  353. MCR_OR   DC.W      $020F               Show cycles enabled, external arbitration
  354. *                                      enable, interrupt arbitration level = $F
  355. *                                      (highest priority).
  356. MCR_AND  DC.W      $DFFF               Enable bus monitor when FREEZE is asserted.
  357. *                                      and set Module Mapping (MM) to map internal
  358. *                                      modules to $FFF000-$FFFFFF.
  359. *MCR_AND  DC.W      $DFBF               Enable bus monitor when FREEZE is asserted
  360. *                                      and set Module Mapping (MM) to map internal
  361. *                                      modules to $7FF000-$7FFFFF.
  362.  
  363. SYPCR_OR   DC.B    $06                 Bus Monitor External Enabled, 16 system clocks
  364. SYPCR_AND  DC.B    $7F                 Disable Software Watchdog
  365. *SYPCR_AND  DC.B    $FF                 Enable Software Watchdog
  366.  
  367. FCRYSTAL DC.W      FCRYSTVAL           Crystal frequency (in Hz)
  368.  
  369. FEXTAL   DC.L      FILL.4              External clock frequency (in Hz)
  370.  
  371.  
  372. * ROM Auto Boot Vectors
  373. RB_SP    DC.L      FILL.4              Allocate space for ROM BOOT SP and PC.
  374. RB_PC    DC.L      FILL.4!1            .  PC bit0= 1 disables ROM BOOT!
  375.    IFNE      4-(RB_PC-RB_SP)
  376.          FAIL      469 ROM BOOT SP/PC not adjacent anymore!
  377.    ENDC
  378.  
  379. * SCI Console Default Initialization Table (CONSCI)
  380. *
  381. CONSCI   DS        0                   * USE THIS FOR CONNECTION TO TERMINALS
  382. *
  383. ********  Each bit set in '.PARMS' below enables the 7 parameters   **********
  384. ********  that follow.  DO NOT ALTER THE VALUE OF '.PARAMS' below!  **********
  385. *
  386. .PARMS   DC.L      $1C0F
  387. *
  388. .BAUD    DC.W      9600                Baud rate (in decimal)
  389. .PARITY  DC.B      0                   Parity: $00= none, 'E'= even, 'O'= odd
  390. .DATA    DC.B      8                   Nbr. data bits:  7 or 8
  391. .STOP    DC.B      1                   Nbr. stop bits:  1 or 2
  392. .XON_ENB DC.B      $FF                 XON/XOFF enable:
  393. *                                      .    $FF= enabled, $00= disabled
  394. .XON     DC.B      $11                 XON  char: ^Q = $11
  395. .XOFF    DC.B      $13                 XOFF char: ^S = $13
  396. *
  397.  
  398. * Periodic Interrupt Timer
  399. *   - assumes 32.768 KHz clock
  400. *
  401. .PICR    DC.W      TIMERLVL<<8+TIMERVEC   Periodic int. control reg. value
  402. *                                         . Defines interrupt level & vector.
  403. .PITR    DC.W      $0102                  Periodic int. timing reg. value
  404. *                                         . Defines SYSCALL "tick" = 125 msec
  405.  
  406. * Power On Branch Vectors
  407. *  - There are no entry/exit restrictions for register usage here.
  408. *
  409. PWR_ON:
  410. PWR_TBL1 BRA.L     INIT_T1           Table #1 Initialization processing
  411. *                                    .  - returns [A6]= Init Table #2 start addr
  412. *                                    .  - returns to PWR_INI
  413. PWR_INI  BRA.L     INIT_CS           Initialize chip selects, etc. for 68332
  414. *                                    .  - returns [D7.L]= Power Up Status Flag
  415. *                                    .  - preserves [A6]
  416. *                                    .  - returns to PWR_TBL2
  417. PWR_TBL2 BRA.L     INIT_T2           Table #2 Initialization processing
  418. *                                    .  - entry [A6]= Init Table #2 start addr
  419. *                                    .  - preserves [D7]
  420. *                                    .  - returns to PWR_TTL
  421. PWR_TTL  BRA.L     PWR_TST           Print sign on message title.
  422. *                                    .  - preserves [D7]
  423. *                                    .  - returns to PWR_TST
  424. *  NOTE:  PWR_TTL is not enabled yet.  Signon message actually gets printed
  425. *         in SYSINIT routine via TRAP 15 calls!  This may be changed in the
  426. *         future so simple SCI routines w/o stack usage can print messages
  427. *         until system has been verified (use address regs for return addrs).
  428. *
  429. PWR_TST  BRA.L     CONFTST           Perform confidence tests.
  430. *                                    .  - preserves [D7.L bits 8-31]
  431. *                                    .  - returns [D7.B]= error code flag
  432. *                                    .  - returns to PWR_GO
  433. PWR_GO   BRA.L     SYSINIT           Go start up the system.
  434. *                                    .  - entry [D7.L bits 8-31]= Power Up
  435. *                                    .      Status Flag
  436. *                                    .  - entry [D7.B]= self-test error code flag
  437. *                                    .  - never returns
  438.          DCB.W     2*3,FILL.2   Reserve space for 2 more BRA.L's (3 words each)
  439. PWR_END  EQU       *
  440.  
  441.     DCB.B      16,FILL.1             <reserved>
  442.  
  443. * Initialization Table Area:
  444. *   - see INITTBL.SA for description!
  445. *
  446. INITTBL  DCB.B    $A0,FILL.1
  447. INITTBLE EQU      *        End of Init. Table.
  448.  
  449. * Sign On Message Test String
  450. *
  451. SIGNON   DS.W      0
  452.          DC.B      SIGN$2-SIGN$1             Set msg byte count
  453. SIGN$1   DC.B      CR,LF,LF
  454. SIGN$3   DC.B      'CPU32Bug Debugger/Diagnostics - Version  1.00'
  455. SIGN1SZ  EQU       *-SIGN$3                  # chars in line #1 = $2D= 45
  456.          DCB.B     34,SPACE                  Pad to end of line (79-45= 34)
  457.          DC.B      CR,LF
  458. SIGN$4   DC.B      ' (C) Copyright 1991 by Motorola Inc.'
  459. SIGN2SZ  EQU       *-SIGN$4                  # chars in line #2 = $24= 36
  460. SIGN3SZ  EQU       ($200-(SIGNON-ORIGIN))-(*-SIGNON)  Extra space= $17 = 23
  461.          DCB.B     23,SPACE                  Pad to end of sigon space
  462. SIGN$2   EQU       *
  463.  
  464.     IFNE      $200-(*-ORIGIN)
  465.          FAIL      499 Param area must= $200 to match user documentation!
  466.     ENDC
  467.     IFNE      $08-(CODESIZE-ORIGIN)
  468.          FAIL      499 CODESIZE must= offset $08 to match user documentation!
  469.     ENDC
  470.     IFNE      $0C-(SRECMAX-ORIGIN)
  471.          FAIL      499 SRECMAX must= offset $0C to match user documentation!
  472.     ENDC
  473.     IFNE      $0E-(CHECKSUM-ORIGIN)
  474.          FAIL      499 CHECKSUM must= offset $0E to match user documentation!
  475.     ENDC
  476.     IFNE      $10-(.CSBAR0-ORIGIN)
  477.          FAIL      499 .CSBAR0 must= offset $10 to match user documentation!
  478.     ENDC
  479.     IFNE      $12-(.CSOR0-ORIGIN)
  480.          FAIL      499 .CSOR0 must= offset $12 to match user documentation!
  481.     ENDC
  482.     IFNE      $3C-(.CSBARBT-ORIGIN)
  483.          FAIL      499 .CSBARBT must= offset $3C to match user documentation!
  484.     ENDC
  485.     IFNE      $3E-(.CSORBT-ORIGIN)
  486.          FAIL      499 .CSORBT must= offset $3E to match user documentation!
  487.     ENDC
  488.     IFNE      $40-(CSBAR0$-ORIGIN)
  489.          FAIL      499 CSBAR0$ must= offset $40 to match user documentation!
  490.     ENDC
  491.     IFNE      $42-(CSOR0$-ORIGIN)
  492.          FAIL      499 CSOR0$ must= offset $42 to match user documentation!
  493.     ENDC
  494.     IFNE      $6C-(MCR_OR-ORIGIN)
  495.          FAIL      499 MCR_OR must= offset $6C to match user documentation!
  496.     ENDC
  497.     IFNE      $6E-(MCR_AND-ORIGIN)
  498.          FAIL      499 MCR_AND must= offset $6E to match user documentation!
  499.     ENDC
  500.     IFNE      $70-(SYPCR_OR-ORIGIN)
  501.          FAIL      499 SYPCR_OR must= offset $70 to match user documentation!
  502.     ENDC
  503.     IFNE      $71-(SYPCR_AND-ORIGIN)
  504.          FAIL      499 SYPCR_AND must= offset $71 to match user documentation!
  505.     ENDC
  506.     IFNE      $72-(FCRYSTAL-ORIGIN)
  507.          FAIL      499 FCRYSTAL must= offset $72 to match user documentation!
  508.     ENDC
  509.     IFNE      $74-(FEXTAL-ORIGIN)
  510.          FAIL      499 FEXTAL must= offset $74 to match user documentation!
  511.     ENDC
  512.     IFNE      $78-(RB_SP-ORIGIN)
  513.          FAIL      499 RB_SP must= offset $78 to match user documentation!
  514.     ENDC
  515.     IFNE      $7C-(RB_PC-ORIGIN)
  516.          FAIL      499 RB_PC must= offset $7C to match user documentation!
  517.     ENDC
  518.     IFNE      $80-(.PARMS-ORIGIN)
  519.          FAIL      499 .PARMS must= offset $80 to match user documentation!
  520.     ENDC
  521.     IFNE      $84-(.BAUD-ORIGIN)
  522.          FAIL      499 .BAUD must= offset $84 to match user documentation!
  523.     ENDC
  524.     IFNE      $86-(.PARITY-ORIGIN)
  525.          FAIL      499 .PARITY must= offset $86 to match user documentation!
  526.     ENDC
  527.     IFNE      $87-(.DATA-ORIGIN)
  528.          FAIL      499 .DATA must= offset $87 to match user documentation!
  529.     ENDC
  530.     IFNE      $88-(.STOP-ORIGIN)
  531.          FAIL      499 .STOP must= offset $88 to match user documentation!
  532.     ENDC
  533.     IFNE      $89-(.XON_ENB-ORIGIN)
  534.          FAIL      499 .XON_ENB must= offset $89 to match user documentation!
  535.     ENDC
  536.     IFNE      $8A-(.XON-ORIGIN)
  537.          FAIL      499 .XON must= offset $8A to match user documentation!
  538.     ENDC
  539.     IFNE      $8B-(.XOFF-ORIGIN)
  540.          FAIL      499 .XOFF must= offset $8B to match user documentation!
  541.     ENDC
  542.     IFNE      $8C-(.PICR-ORIGIN)
  543.          FAIL      499 .PICR must= offset $8C to match user documentation!
  544.     ENDC
  545.     IFNE      $8E-(.PITR-ORIGIN)
  546.          FAIL      499 .PITR must= offset $8E to match user documentation!
  547.     ENDC
  548.     IFNE      $90-(PWR_ON-ORIGIN)
  549.          FAIL      499 PWR_ON must= offset $90 to match user documentation!
  550.     ENDC
  551.     IFNE      $90-(PWR_TBL1-ORIGIN)
  552.          FAIL      499 PWR_TBL1 must= offset $90 to match user documentation!
  553.     ENDC
  554.     IFNE      $96-(PWR_INI-ORIGIN)
  555.          FAIL      499 PWR_INI must= offset $96 to match user documentation!
  556.     ENDC
  557.     IFNE      $9C-(PWR_TBL2-ORIGIN)
  558.          FAIL      499 PWR_TBL2 must= offset $9C to match user documentation!
  559.     ENDC
  560.     IFNE      $A2-(PWR_TTL-ORIGIN)
  561.          FAIL      499 PWR_TTL must= offset $A2 to match user documentation!
  562.     ENDC
  563.     IFNE      $A8-(PWR_TST-ORIGIN)
  564.          FAIL      499 PWR_TST must= offset $A8 to match user documentation!
  565.     ENDC
  566.     IFNE      $AE-(PWR_GO-ORIGIN)
  567.          FAIL      499 PWR_GO must= offset $AE to match user documentation!
  568.     ENDC
  569.     IFNE      $D0-(INITTBL-ORIGIN)
  570.          FAIL      499 INITTBL must= $D0 to match user documentation!
  571.     ENDC
  572.     IFNE      $170-(INITTBLE-ORIGIN)
  573.          FAIL      499 INITTBLE must= $170 to match user documentation!
  574.     ENDC
  575.     IFNE      $170-(SIGNON-ORIGIN)
  576.          FAIL      499 SIGNON must= $170 to match user documentation!
  577.     ENDC
  578.  
  579.          END
  580.